package cn.yunhe.service.impl;

import cn.yunhe.dao.StreetDao;
import cn.yunhe.model.Street;
import cn.yunhe.service.StreetBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/*spring注解*/
@Service(value = "streetBiz")
public class StreetBizImpl implements StreetBiz {

    /*spring注解*/
    @Autowired
    @Qualifier("streetDao")
    StreetDao streetDao;

    @Override
    public boolean insertStreet(Street street) {
        return streetDao.insertStreet(street);
    }

    @Override
    public boolean updateStreet(Street street) {
        return streetDao.updateStreet(street);
    }

    @Override
    public boolean deleteStreet(Integer hid) {
        return streetDao.deleteStreet(hid);
    }

    @Override
    public Street getById(Integer hid){
        return streetDao.getById(hid);
    }

    @Override
    public List<Street> searchStreet(String hql) {
        return streetDao.searchStreet(hql);
    }

    @Override
    public List<Street> searchStreet(Street street) {
        return streetDao.searchStreet(street);
    }

    public StreetDao getStreetDao() {
        return streetDao;
    }

    public void setStreetDao(StreetDao streetDao) {
        this.streetDao = streetDao;
    }
}
